Author final version of On graphs of defect at most 2